#include <bits/stdc++.h>
using namespace std;
long long dd[100001];
long long v0[100001];
long long aa[100001];
long long pl[100001];
int main()
{
    freopen("detect.in","r",stdin);
    freopen("detect.out","w",stdout);
    long long t;
    long long n, m, l, v;
    cin >> t;
    for (int i = 1; i <= t; i++)
    {
        cin >> n >> m >> l >> v;

        for (int j = 1; j <= n; j++)
        {
            cin >> dd[j] >> vv[j] >> aa[j];
        }
        for (int k = 1; k <= m; k++)
        {
            cin >> pl[k];
        }
    }
    return 0;
}
